gtkseparatortoolitem: unseal private pointer
authorJavier Jardón <jjardon@gnome.org>
Mon, 12 Jul 2010 18:26:22 +0000 (20:26 +0200)
committerJavier Jardón <jjardon@gnome.org>
Tue, 13 Jul 2010 17:40:50 +0000 (19:40 +0200)
gtk/gtkseparatortoolitem.c
gtk/gtkseparatortoolitem.h

index db53893536b33c59835d51edfe0c2dc9d1c02621..54f72dfbe4d374c5a753412361b566b6e02942ed 100644 (file)
 
 #define MENU_ID "gtk-separator-tool-item-menu-id"
 
+struct _GtkSeparatorToolItemPrivate
+{
+  guint draw : 1;
+};
+
 enum {
   PROP_0,
   PROP_DRAW
@@ -70,14 +75,6 @@ static void     gtk_separator_tool_item_add               (GtkContainer
 static gint     get_space_size                            (GtkToolItem               *tool_item);
 
 
-
-#define GTK_SEPARATOR_TOOL_ITEM_GET_PRIVATE(obj)(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_SEPARATOR_TOOL_ITEM, GtkSeparatorToolItemPrivate))
-
-struct _GtkSeparatorToolItemPrivate
-{
-  guint draw : 1;
-};
-
 G_DEFINE_TYPE (GtkSeparatorToolItem, gtk_separator_tool_item, GTK_TYPE_TOOL_ITEM)
 
 static gint
@@ -131,7 +128,9 @@ gtk_separator_tool_item_class_init (GtkSeparatorToolItemClass *class)
 static void
 gtk_separator_tool_item_init (GtkSeparatorToolItem      *separator_item)
 {
-  separator_item->priv = GTK_SEPARATOR_TOOL_ITEM_GET_PRIVATE (separator_item);
+  separator_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (separator_item,
+                                                      GTK_TYPE_SEPARATOR_TOOL_ITEM,
+                                                      GtkSeparatorToolItemPrivate);
   separator_item->priv->draw = TRUE;
 }
 
@@ -216,8 +215,8 @@ gtk_separator_tool_item_expose (GtkWidget      *widget,
                                GdkEventExpose *event)
 {
   GtkToolbar *toolbar = NULL;
-  GtkSeparatorToolItemPrivate *priv =
-      GTK_SEPARATOR_TOOL_ITEM_GET_PRIVATE (widget);
+  GtkSeparatorToolItem *separator = GTK_SEPARATOR_TOOL_ITEM (widget);
+  GtkSeparatorToolItemPrivate *priv = separator->priv;
 
   if (priv->draw)
     {
index 1547742c23e7735fed2560ba57ccad084276e19e..b027a2f16f8a1a1d21d029e053cf59dd14bdc8b5 100644 (file)
@@ -46,7 +46,7 @@ struct _GtkSeparatorToolItem
   GtkToolItem parent;
 
   /*< private >*/
-  GtkSeparatorToolItemPrivate *GSEAL (priv);
+  GtkSeparatorToolItemPrivate *priv;
 };
 
 struct _GtkSeparatorToolItemClass